package com.training1.core.web.controller;


import java.io.IOException;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.training1.core.common.controller.BaseController;
import com.training1.core.modules.service.ChargeService;

@Controller
@RequestMapping("memberCharge")
public class ChargeController extends BaseController{
	
	
	@Resource
	private ChargeService chargeService;
	
	/**
	 * 进入会员列表页面
	 * @return
	 */
	@RequestMapping(value={"","/"})
	public String go(){
		return "member/charge";
	}
	
	//上传
	@RequestMapping("upload")
	@ResponseBody
	public Map<String,String> upload(MultipartFile file) throws IOException {
		return chargeService.upload(file);
	}
	
	//充值
	@RequestMapping("charge")
	@ResponseBody
	public Map<String, String> charge(String path) throws IOException{
		
		return chargeService.charge(path);
	}
	
	
	
}
